﻿using System;

namespace enyo
{
    public class Drawer : Control
    {
        /// <summary>
        /// Specifies whether the drawer should be open.
        /// </summary>
        public bool Open { get; set; }

        /// <summary>
        /// Controls whether or not the value of the open property may be changed.
        /// </summary>
        public bool CanChangeOpen { get; set; }

        /// <summary>
        /// Set to false to avoid animations when the open state of a drawer changes.
        /// </summary>
        public bool Animate { get; set; }

        /// <summary>
        /// CSS class to apply to the drawer caption.
        /// </summary>
        public string CaptionClassName { get; set; }

        /// <summary>
        /// Caption to display above drawer content.
        /// </summary>
        public string Caption { get; set; }

        /// <summary>
        /// Event that fires when a drawer opens or closes.
        /// </summary>
        public EnyoEvent<Control> onOpenChanged;

        /// <summary>
        /// Event that fires when a drawer animation completes.
        /// </summary>
        public EnyoEvent<Control> onOpenAnimationComplete;


        /// <summary>
        /// Convenience method to close a drawer; equivalent to setOpen(false).
        /// </summary>
        public void Close()
        {
        }

        /// <summary>
        /// Convenience method to open a drawer; equivalent to setOpen(true).
        /// </summary>
        [ImportMember("open")]
        public void Opens()
        {
        }

        /// <summary>
        /// Toggles the open state of the drawer.
        /// </summary>
        public void ToggleOpen()
        {
        }
    }
}
